﻿package view.task
{
    import com.core.*;
    import pluginfw.nio.imsg.*;

    public class TaskGroupHandler extends Object implements IGroupHandler
    {

        public function TaskGroupHandler()
        {
            return;
        }// end function

        public function dealSimpleMessage(param1:ISimpleMessage) : void
        {
            switch(param1.getCmd())
            {
                case CMDTask.GetTask:
                {
                    ModelProxy.change("tasktrack", "init", param1.getParam());
                    ModelProxy.change("task", "gettask", param1.getParam());
                    break;
                }
                case CMDTask.AcceptTask:
                {
                    ModelProxy.change("tasktrack", "changestate", param1.getParam());
                    break;
                }
                case CMDTask.AddGoal:
                {
                    ModelProxy.change("tasktrack", "changegoal", param1.getParam());
                    break;
                }
                case CMDTask.CompleteGoal:
                {
                    ModelProxy.change("tasktrack", "updategoal", param1.getParam());
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

        public function dealBufferMessage(param1:IBufferMessage) : void
        {
            return;
        }// end function

        public function dealProxyMessage(param1:IProxyMessage) : void
        {
            return;
        }// end function

    }
}
